<div class="kk-box ">
    <div class="kk-block-bd" >
        <ul class="ul-extral">
            <li v="0">￥0</li>
            <li v="50">￥50</li>
            <li v="100">￥100</li>
            <li v="200">￥200</li>
            <li>自定义￥<input class="extralInput" type="number"/></li>
        </ul>
    </div>
</div>

<div style="margin-top: 10px">
    <a class="weui-btn weui-btn_primary" href="javascript:" style="line-height:2;width:90%" onclick="finishExtral()"> 完 成 </a>
</div>
<script>

function finishExtral(){

    $(".ul-extral li").each(function(){
        if($(this).hasClass("greenFont")){
            if($(this).find("input").length==1){
                changeExtralFee($(".extralInput").val())
            }else{
                changeExtralFee($(this).attr("v"))
            }
        }
    });
    document.title="开方";
    $.kkclosePopup();
}
$(".ul-extral li").click(function(){
    $(".ul-extral li").css("color","#e1e1e1").removeClass("greenFont");
    $(this).addClass("greenFont");
});
$(".extralInput").blur(function(){
    $(".ul-extral li:last").attr("v",$(this).val());
});
</script>